package com.tencent.qcloud.ui;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.tencent.qcloud.presentation.viewfeatures.ChatView;

/**
 * Created by User on 2016/12/4.
 */
public class ImSendView extends LinearLayout {
    Context context;
    ChatView chatView;


    public void setChatView(ChatView chatView) {
        this.chatView = chatView;
    }

    public ImSendView(Context context) {
        this(context, null);

    }

    public ImSendView(Context context, AttributeSet attrs) {
        super(context, attrs);
this.context =context;
        initView();
    }


    private void initView() {
        View view = LayoutInflater.from(context).inflate(R.layout.view_im_send, this);
TextView sendBtn = (TextView)view.findViewById(R.id.sendBtn);
        sendBtn.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                chatView.sendText();
            }
        });
    }

}
